package twoDimensionArr;

public class OrderSearch {
	public static void main(String[] args) {
		int a[]={1,4,8,3,11};
		int num=3;
		find(num,a );
	}

	private static void find(int num, int[] a) {
		boolean judge=false;
		int n=0;
		for (int i = 0; i < a.length; i++) {
			if(a[i]==num){
				judge=true;
				n=i;
			}
		}
		if(judge)
			System.out.println("located at:"+n);
		else
			System.out.println("cannot find it");
	}

}
